package com.study.springairag.etl.config;

import org.springframework.ai.model.transformer.SummaryMetadataEnricher;
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
class EnricherConfig {

    @Bean
    public SummaryMetadataEnricher summaryMetadata(OpenAiChatModel aiClient) {
        return new SummaryMetadataEnricher(aiClient,
            List.of(SummaryMetadataEnricher.SummaryType.PREVIOUS,
                    SummaryMetadataEnricher.SummaryType.CURRENT,
                    SummaryMetadataEnricher.SummaryType.NEXT));
    }
}